package cn.moukou.tongji.ihealth.predication;

import cn.moukou.tongji.ihealth.predication.websocket.WsServer;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

@Component
public class NettyBooter implements ApplicationListener<ContextRefreshedEvent> {
    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
//        if(event.getApplicationContext().getParent()==null) {
            WsServer.getInstance().start();
//        }
    }
}
